/*
 * 
 * LegendShop 多用户商城系统
 * 
 *  版权所有,并保留所有权利。
 * 
 */
package com.legendshop.oa.dao.impl;

import com.legendshop.dao.impl.GenericDaoImpl;
import com.legendshop.dao.support.CriteriaQuery;
import com.legendshop.dao.support.EntityCriterion;
import com.legendshop.dao.support.PageSupport;
import com.legendshop.oa.dao.CustomerFollowDao;
import com.legendshop.oa.model.CustomerFollow;

import java.util.List;

/**
 * The Class CustomerFollowDaoImpl.
  * Dao实现类
 */

public class CustomerFollowDaoImpl extends GenericDaoImpl<CustomerFollow, Long> implements CustomerFollowDao  {
     
	/**
	 *  根据商城获取列表
	 */     
    public List<CustomerFollow> getCustomerFollow(String userName){
   		return this.queryByProperties(new EntityCriterion().eq("userName", userName));
    }
    
   	/**
	 *  根据Id获取
	 */
	public CustomerFollow getCustomerFollow(Long id){
		return getById(id);
	}

   /**
	 *  删除
	 */	
    public int deleteCustomerFollow(CustomerFollow customerFollow){
    	return delete(customerFollow);
    }

   /**
	 *  保存
	 */		
	public Long saveCustomerFollow(CustomerFollow customerFollow){
		return save(customerFollow);
	}

   /**
	 *  更新
	 */		
	public int updateCustomerFollow(CustomerFollow customerFollow){
		return update(customerFollow);
	}

   /**
	 *  查询列表
	 */		
	public PageSupport getCustomerFollow(CriteriaQuery cq){
		return queryPage(cq);
	}
	
 }
